# create new competition folder hierarchy

import os
import sys
import shutil

if len(sys.argv) != 2:
    print("please input your competition name")
    exit(1)

folder_name = sys.argv[1]

if not os.path.exists(folder_name):
    os.mkdir(folder_name)
    os.makedirs(folder_name + "/input")
    os.makedirs(folder_name + "/output")
    shutil.copy("init.ipynb", folder_name + "/" + folder_name  + ".ipynb")
    print("Create Succeed!")
else:
    print("Failed! The Folder exists!")
